package com.imooc.ad.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/*
 * @anthor Qihs
 */
//统一响应,不知道响应类型，所以使用泛型
//此处不加注解，Response中的setData方法会报错
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CommonResponse<T> implements Serializable{

    private  Integer code;
    private  String message;
    private  T data;

    public CommonResponse(Integer code,String message){
        this.code =code;
        this.message = message;
    }

}
